package com.supermap.dubbo.api.user.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author:langhongshuai
 * @Description:用户信息
 * @Date:18/1/3 上午10:39
 */
@SuppressWarnings("serial")
public class User implements Serializable{

    /**
     * 用户id
     */
    private int id;

    /**
     * 用户名
     */
    private String username;

    /**
     *登陆名
     */
    private String loginName;

    /**
     * 昵称
     */
    private String showName;

    /**
     *密码
     */
    private String password;

    /**
     *用户电话
     */
    private String mobile;

    /**
     *用户地址
     */
    private String address;

    /**
     *用户邮箱
     */
    private String Email;

    /**
     *用户状态
     */
    private String state;

    /**
     *用户头像
     */
    private String HeadImage;

    /**
     *用户介绍
     */
    private String Introduction;

    /**
     *用户区域code
     */
    private String areaCode;



    /**
     *用户是否删除
     */
    private int del_flg;

    /**
     *用户创建时间
     */
    private Date createtime;

    /**
     * 纬度
     */
    private String latitude;

    /**
     * 经度
     */
    private String longitude;

    /**
     * 角色code
     */
    private String rolecode;

    /**
     * 角色名
     */
    private String rolename;


    /**
     * 区域名
     */
    private String areaname;

    /**
     * 省份
     * **/
    private String province;
    /**
     * 市
     * */
    private String city;
    /**
     * 区县
     * **/
    private String area;



    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getShowName() {
        return showName;
    }

    public void setShowName(String showName) {
        this.showName = showName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getEmail() {
        return Email;
    }

    public void setEmail(String email) {
        Email = email;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getHeadImage() {
        return HeadImage;
    }

    public void setHeadImage(String headImage) {
        HeadImage = headImage;
    }

    public String getIntroduction() {
        return Introduction;
    }

    public void setIntroduction(String introduction) {
        Introduction = introduction;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public int getDel_flg() {
        return del_flg;
    }

    public void setDel_flg(int del_flg) {
        this.del_flg = del_flg;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public String getRolecode() {
        return rolecode;
    }

    public void setRolecode(String rolecode) {
        this.rolecode = rolecode;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public void updateUser(User user) {
        this.showName = user.getShowName() == null ? this.showName : user.getShowName();
        this.username = user.getUsername() == null ? this.username : user.getUsername();
        this.loginName = user.getLoginName() == null ? this.loginName : user.getLoginName();
        this.mobile = user.getMobile() == null ? this.mobile : user.getMobile();
        this.address = user.getAddress() == null ? this.address : user.getAddress();
        this.areaCode = user.getAreaCode() == null ? this.areaCode : user.getAreaCode();
        this.Introduction = user.getIntroduction() == null ? this.Introduction : user.getIntroduction();
        this.HeadImage = user.getHeadImage() == null ? this.HeadImage : user.getHeadImage();
        this.Email = user.getEmail() == null ? this.Email : user.getEmail();
        this.latitude = user.getLatitude() == null ? this.latitude : user.getLatitude();
        this.longitude = user.getLongitude() == null ? this.longitude : user.getLongitude();
    }

    public String getRolename() {
        return rolename;
    }

    public void setRolename(String rolename) {
        this.rolename = rolename;
    }

    public String getAreaname() {
        return areaname;
    }

    public void setAreaname(String areaname) {
        this.areaname = areaname;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }
}
